package com.blog;

import java.util.Scanner;

/**
 * @author cgx
 * @Date 2022/1/13 18:03
 */
public class aaaa {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int x = scanner.nextInt();

        if (x < 1){
            System.out.println(x);
        }else if (x >= 1 && x <10){
            System.out.println(2*x-1);
        }else if (x >= 10){
            System.out.println(3*x-11);
        }
    }
}
